{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/css/bootstrap.min.css' %}">
    <style>
      .one{
      width: 400px;
      height:360px;
      margin-top:100px;
      margin-left:auto;
      margin-right:auto;
    }
    .panel-body{
      height:300px;
      weight:360px;
    }

  </style>
</head>
  <div class="one">
    
        <div class="panel panel-default">
          <div class="panel-body">
            <div style="font-size: 25px; font-weight: bold;text-align: center;">
              用户登录
          </div>
              <form method='post' >
                  {% csrf_token %}
                  <div class="form-group">
                      <label>用户名</label>
                      {{form.username}}
                      <span>{{form.username.error.0}}</span>
                      <input type="text" class="form-control" placeholder="用户名" name=names >
                      <label for="exampleInputEmail1">密码</label>
                      {{form.password}}
                      <span>{{form.password.error.0}}</span>
                      <input type="password" class="form-control" placeholder="密码" name=pwd >
                    </div>
                    <div class="form-group">
                      <label for="id_code">图片验证码</label>
                      <div class="row">
                          <div class="col-xs-7">
                              <input type="text" name="code" class="form-control" placeholder="请输入图片验证码" required="" id="id_code">
                              <span style="color: red;"></span>
                          </div>
                          <div class="col-xs-5">
                              <img id="image_code" src="{% static 'img/code.jpg' %}" alt="" width="130px">
                          </div>
                      </div>
                  </div>
                  <input type="submit" class="btn btn-primary" value="登 陆">
                </form>
          </div>
        </div>
  </div>    
</head>    
<script src="{% static 'js/jquery-3.6.0.min.js' %}"></script>
<script src="{% static 'plugins/bootstrap-3.4.1/js/bootstrap.min.js' %}"></script>
</body>
</html>
